package com.grao.waterschool.human.config;

import io.minio.MinioClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MinioConfig {

    //    @Value("${minio.url}")
    private final String url = "http://58.58.177.247:19000";
    //    @Value("${minio.accessKey}")
    private final String accessKey = "woRNpvmbOMa5bmAJmImF";
    //    @Value("${minio.secretKey}")
    private final String secretKey = "N5NMEELExjlDaX8uY1R11uAtNMiuSAtNc7xYciMM";

    @Bean
    public MinioClient getMinioClient() {
        MinioClient minioClient = MinioClient.builder().endpoint(url)
                .credentials(accessKey, secretKey).build();
        return minioClient;
    }

}
